package HomeWork2.GirlFriend;
/*
定义一个女朋友类（GirlFriend）女朋友的属性包含：姓名，身高，体重。行为包含：洗衣服wash()，做饭cook()。
另外定义一个用于展示三个属性值的show()方法。
 */
public class GirlFriend {
    private String name;
    private double height;
    private double weight;
//Constructor=======================================================
    public GirlFriend() {

    }

    public GirlFriend(String name, double height, double weight) {
        this.name = name;
        this.height = height;
        this.weight = weight;
    }
//Getter and Setter================================================
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }
//Method==========================================================
    public void wash(){
        System.out.println("女朋友帮我洗衣服");
    }

    public void cook(){
        System.out.println("女朋友给我做饭");
    }

    public void show(){
        System.out.println("我女朋友叫"+this.name+",身高"+this.height+"厘米,体重"+this.weight+"斤");
    }
}
